package data;

import java.io.Serializable;

import com.google.appengine.api.datastore.Key;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable
public class Vote implements Serializable{

	@Persistent
	private static final long serialVersionUID = -4513949756810249152L;

	public Vote(int vote) {
		this.vote = vote;
	}

	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Key key;

	@Persistent
	private int vote;

	@Persistent
	String voter;

	public String toString() {
		return "vote: " + vote + " " + voter;
	}

	public int getVote() {
		return vote;
	}

	public String getVoter() {
		return voter;
	}

	public void setVoter(String voter) {
		this.voter = voter;
	}

	public void setVote(int vote) {
		this.vote = vote;
	}

	public Key getKey() {
		return key;
	}

	
	
}
